package cn.javabb.core.plugin.thymeleaf.config;

import cn.javabb.core.plugin.thymeleaf.BbsDialect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ThymeleafConfig {
   /* @Autowired
    private SysConfigService sysConfigService;*/
    @Bean
    public BbsDialect getBbsDialect(){
        return new BbsDialect();
    }

   /* @Order(1)
    @Resource
    private void configureThymeleafStaticVars(ThymeleafViewResolver viewResolver) {
        if(viewResolver != null) {
            SysConfigService configService = SpringContextUtil.getBean(SysConfigService.class);
            Map<String, Object> vars = new HashMap<>();
            vars.put("config", configService.getConfigs(null));
            viewResolver.setStaticVariables(vars);
        }
    }*/
}
